//
//  JSQKeyboardViewController.m
//  Conversation
//
//  Created by C_HAO on 15/12/14.
//  Copyright © 2015年 CHAOO. All rights reserved.
//

#import "JSQKeyboardViewController.h"
#import "JSQKeyView.h"

@interface JSQKeyboardViewController ()

@property (weak, nonatomic) IBOutlet UITextView *textView;

@end

@implementation JSQKeyboardViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (IBAction)tap:(id)sender {
    NSString *text = @"空军~:a9~~:b0~~:b1~~:b2~~:b2~~:b1~~:b1~~:b1~~:b0~~:b0~~:a9~~:b6~~:b6~图兔兔太可怜了啦啦啦~:a9~~:b0~~:b1~~:b1~~:b2~~:b8~~:b8~";

    text = [JSQKeyView interceptCharacter:text characterLength:30];

    [JSQKeyView showKeyboardView:self.view inputContent:^(NSString *string, NSAttributedString *attributedString) {
        if (attributedString) {
            _textView.attributedText = attributedString;
        } else {
            _textView.text = string;
        }
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
